package com.cw.beans;

public class User {
    private int    id;//用户id
    private String name;//用户名字
    private String username;//用户名
    private String password;//用户密码
    private int    rid;//角色id
    private Role   role;
  private  String phone;
    private String    email;
    public User(int id, String name, String username,String password, int rid,Role role) {
        this.id = id;
        this.name = name;
        this.username = username;
        this.password = password;
        this.rid = rid;
        this.role = role;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public User(String email, int id, String name, String password, String phone_number, int rid, Role role, String username) {
        this.email = email;
        this.id = id;
        this.name = name;
        this.password = password;
        this.phone = phone_number;
        this.rid = rid;
        this.role = role;
        this.username = username;
    }

    public int getRid() {
        return rid;
    }

    public void setRid(int rid) {
        this.rid = rid;
    }

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public User() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Override
    public String toString() {
        return "User{" +
                "email='" + email + '\'' +
                ", id=" + id +
                ", name='" + name + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", rid=" + rid +
                ", role=" + role +
                ", phone='" + phone + '\'' +
                '}';
    }
}
